package sisop;

public class StampanteTSequenziale extends Thread {

	private int da;
	private int a;

	public StampanteTSequenziale(int da, int a) {
		this.da = da;
		this.a = a;
	}

	public void run() {
		for (int i = da; i <= a; i++) {
			System.out.print(i + "\t");
		}
		System.out.println();
	}

	public static void main(String[] args) {

		StampanteTSequenziale s1 = new StampanteTSequenziale(1, 10);
		StampanteTSequenziale s2 = new StampanteTSequenziale(11, 20);
		s1.start();
		try {
			s1.join();
			s2.start();
			s2.join();
		} catch (InterruptedException e) {

		}
		System.out.println("Fine");

	}

}
